﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Hotel.Login"
    EnableTheming="true" %>

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
   
    <script>

        function Validate() {
            var name = document.getElementById('txtUName').value;
            var pwd = document.getElementById('txtPwd').value;

            if (name.length == 0) {
                document.getElementById('lblerror').innerHTML = 'User Name is required';
                return false;
            }
            if (pwd.length == 0) {
                document.getElementById('lblerror').innerHTML = 'Password is required';
                return false;
            }
        }
        //$(document).ready(function () {

        //    $("#btnLogin").click(function (e) {

        //        var name = $('#txtUName').val();
        //        var passWord = $('#txtPwd').val();
        //        if (name.length == 0) {

        //            $('#lblerror').html('User Name cannot be blank');
        //            return false;
        //        }
        //        if (passWord.length == 0) {

        //            $('#lblerror').html('Password cannot be blank');
        //            return false;
        //        }

        //    });

        //});



    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div style="text-align:center;">
            <div style="height:150px;">&nbsp;</div>
             <h1>Hotel Gaayatri Resiidency</h1>
            <table  width="100%">

                <tr>
                    <td align ="center">
                        <table >
               
                <tr>
                    <td >
                        User Name
                    </td>
                    <td>
                        <asp:TextBox ID="txtUName" runat="server" Width="150" CssClass="textbox" MaxLength="10"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td >Password
                    </td>
                    <td>
                        <asp:TextBox ID="txtPwd" runat="server" Width="150" CssClass="textbox" MaxLength="10"
                            TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="right">
                        <asp:Button ID="btnLogin" runat="server" Text="Login" CssClass="button" OnClientClick="return  Validate();" OnClick="btnLogin_Click"></asp:Button>
                    </td>
                </tr>
                            

            </table>
                        </td>
                    </tr>
                </table>

            <asp:Label ID="lblerror" runat="server" CssClass="labelError" Width="600" ForeColor="Red" ></asp:Label>
        </div>

        
                   
      



              
           
           
               
            
         
                <asp:Label ID="lblMessage" runat="server" Text="" CssClass="labelError"></asp:Label>
           
          
   
            
           
    </form>
</body>
</html>
